# Contributor: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
# Maintainer: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
pkgname=py3-platypus
pkgver=1.1.0
pkgrel=2
pkgdesc="A Free and Open Source Python Library for Multiobjective Optimization"
url="https://github.com/Project-Platypus/Platypus"
arch="noarch"
license="GPL-3.0-or-later"
depends="python3 py3-numpy"
checkdepends="py3-pytest"
makedepends="py3-gpep517 py3-setuptools py3-wheel"
subpackages="$pkgname-pyc"
source="https://github.com/Project-Platypus/Platypus/archive/$pkgver/platypus-$pkgver.tar.gz"
builddir="$srcdir/Platypus-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m pytest
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl

	rm -r "$pkgdir"/usr/lib/python3.*/site-packages/platypus/tests
}

sha512sums="
1ffe9526cd0ab3b95c4e81b726a56df50f6ca7bfc1898ec4c653200a7fb390bb97c39ff642bf2635dba2373e9f99e6bcac892ddab0ecb5c945744b261cd3b791  platypus-1.1.0.tar.gz
"
